@use './variables' as *;
@use './components/animations' as *;
// 管理后台样式
@use './admin/layout';
@use './admin/dashboard';
@use './admin/posts';
@use './admin/categories';
@use './admin/tags';
@use './admin/friends';
@use './admin/comments';
@use './admin/admin-login';
@use './admin/post-edit';
@use './admin/cache-management';
// 字体优化工具类
@use './components/typography';
// 前台页面样式
@use './clients/contact';
@use './clients/about';
@use './clients/blog';
@use './clients/blog-detail';
@use './clients/friends';
@use './clients/home';
@use './clients/login';
@use './clients/subscribe';
@use './clients/timeline';
// 全局重置样式
* {
    box-sizing: border-box;
}

// 应用根元素样式
#app {
    font-family: $font-family;
    color: $text-primary;
    background-color: $bg-primary;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: $font-family;
    font-size: $text-base;
    line-height: 1.6;
    color: $text-primary;
    background-color: $background-light;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga' 1, 'kern' 1;
    font-display: swap;
}

// 链接样式
a {
    color: inherit;
    text-decoration: none;
    transition: color $transition-normal;
    &:hover {
        color: $accent-color;
    }
}

// 标题样式
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 $spacing-md 0;
    font-weight: $font-semibold;
    line-height: 1.2;
    color: $text-primary;
}

h1 {
    font-size: $text-4xl;
}

h2 {
    font-size: $text-3xl;
}

h3 {
    font-size: $text-2xl;
}

h4 {
    font-size: $text-xl;
}

h5 {
    font-size: $text-lg;
}

h6 {
    font-size: $text-base;
}

// 段落样式
p {
    margin: 0 0 $spacing-md 0;
    color: $text-secondary;
}

// 按钮样式
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all $transition-normal;
    &:focus {
        outline: none;
    }
}

// 输入框样式
input,
textarea {
    font-family: inherit;
    border: 1px solid $border-color;
    border-radius: $radius-md;
    padding: $spacing-sm $spacing-md;
    transition: border-color $transition-normal;
    &:focus {
        outline: none;
        border-color: $accent-color;
    }
}

// 滚动条样式
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: $border-light;
    border-radius: $radius-sm;
}

::-webkit-scrollbar-thumb {
    background: $text-muted;
    border-radius: $radius-sm;
    transition: background $transition-normal;
    &:hover {
        background: $text-secondary;
    }
}

// 选择文本样式
::selection {
    background-color: rgba($accent-color, 0.2);
    color: $text-primary;
}

// 工具类
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.m-0 {
    margin: 0;
}

.p-0 {
    padding: 0;
}

.rounded {
    border-radius: $radius-md;
}

.rounded-full {
    border-radius: $radius-full;
}

.shadow {
    box-shadow: $shadow-md;
}

.shadow-lg {
    box-shadow: $shadow-lg;
}

.transition {
    transition: all $transition-normal;
}

// 滚动到顶部功能
html {
    scroll-behavior: smooth;
}

// 确保页面可以正常滚动
body {
    overflow-y: auto;
}